﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UPMS.Core.Domain.Mapping
{
    public class PermissionMap : BaseMap<Permission>
    {
        public PermissionMap()
        {
            this.ToTable("Upms_tbl_Permission");
            this.Property(p => p.ModuleId).HasColumnName("ModuleId");
            this.Property(p => p.Name).HasColumnName("Name").HasMaxLength(512);

            this.HasRequired(m => m.Module).WithMany(a => a.Permissions).HasForeignKey(m => m.ModuleId);
           

        }
    }
}
